<?php
class RegionController extends BaseManageController{
	public function actionIndex($act = null, $parent = null){
		if($act != null){
			$accepted_acts = array('opts');
			if(in_array($act, $accepted_acts)){
				$act = '_' . $act;
				if(method_exists($this, $act)){
					$this->$act($parent);
				}
				throw new CHttpException(500, '非法请求！');
			}
		}
		$this->render('index');
	}
	
	private function _opts($parent){
		$mod = new RegionModel();
		$regions = $mod->find(array('parent'=>intval($parent)), 'name');
		$this->ajax_info('true', $regions);
	}
}

?>